<!--
   Copyright 2008 Alexey Vishentsev

   Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   
-->
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://gwtspreadsheetinput-jsf" prefix="s" %>
<html>
	<head>
		<title>Test</title>
		<link rel="stylesheet" href="css/SpreadSheet.css"/>
	</head>
	<body>
		<f:view>
		  <h:form id="form1">
          <s:spreadsheetinput id="spreadsheet" var="testvar" value="#{mySpreadSheetBean.data}"
            width="450" height="200" rowObjectClassName="SpreadSheetData">
            <s:column id="first" required="true" title="First column" width="200" value="#{testvar.first}"></s:column>
            <s:column id="second" title="Second column" width="250" value="#{testvar.second}"></s:column>
            <s:column id="int" title="Int column" width="250" value="#{testvar.intProperty}"></s:column>
          </s:spreadsheetinput>		  
		  <h:messages />
		  <%-- 
		  <h:dataTable id="mainTable" value="#{myTableBean.data}" var="d">
		      <h:column>
		          <f:facet name="header"><h:outputText value="Name"/></f:facet>
		          <h:inputText id="inputName" value="#{d.name}" />
		      </h:column>
		      <h:column>
		          <f:facet name="header"><h:outputText value="Value"/></f:facet>
		          <h:outputText value="#{d.value}" />
		      </h:column>
		      <h:column>
                  <f:facet name="header"><h:outputText value="Date"/></f:facet>
                  <h:outputText value="#{d.date}" />
              </h:column>
		  </h:dataTable>
		  --%>
		  <h:commandButton action="#{mySpreadSheetBean.print}" value="Print" />
		  </h:form>
		</f:view>
	</body>	
</html>  
